#ifndef DUCK_H
#define DUCK_H

#include "behavior.h"
#include <memory>

/// 所有鸭的抽象
class Duck
{
public:
    Duck(FlyBehavior *pB);
    virtual ~Duck();
    void Swim();
    virtual void Display();
    void SetFlyBehavior(FlyBehavior *pB);

protected:
    FlyBehavior *m_FlyBehavior;
};

/// 绿头鸭
class MallardDuck : public Duck
{
public:
    MallardDuck(FlyBehavior *pB);
    void Display();
};

/// 红头鸭
class RedheadDuck : public Duck
{
public:
    RedheadDuck(FlyBehavior *pB);
    void Display();
};

/// 机器鸭
class RubberDuck  : public Duck
{
public:
    RubberDuck(FlyBehavior *pB);
    void Display();
};


#endif // DUCK_H
